From 63e9e7e8997543827161d288648b2d8b4b95e439 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 31 May 2022 15:58:21 -0700 Subject: [PATCH] builderparser: fix with interface types If we have a a runtime warning would be emitted and the expression would fail to be created. This is because the interfaces will likely be a GObject as well, meaning we check the object type branch instead of the interface. Instead, we need to use the fundamental type like other parts of the expression system use. --- gtk/gtkbuilderparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index ccfb1cbc56..c2afb64579 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -1409,13 +1409,13 @@ expression_info_construct (GtkBuilder *builder, return NULL; } - if (g_type_is_a (type, G_TYPE_OBJECT)) + if (g_type_fundamental (type) == G_TYPE_OBJECT) { GObjectClass *class = g_type_class_ref (type); pspec = g_object_class_find_property (class, info->property.property_name); g_type_class_unref (class); } - else if (g_type_is_a (type, G_TYPE_INTERFACE)) + else if (g_type_fundamental (type) == G_TYPE_INTERFACE) { GTypeInterface *iface = g_type_default_interface_ref (type); pspec = g_object_interface_find_property (iface, info->property.property_name); -- 2.30.2